/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "SCAMVD_CALIDAD_AIRE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ScamvdCalidadAire.findAll", query = "SELECT s FROM ScamvdCalidadAire s"),
    @NamedQuery(name = "ScamvdCalidadAire.findByIdEsta", query = "SELECT s FROM ScamvdCalidadAire s WHERE s.scamvdCalidadAirePK.idEsta = :idEsta"),
    @NamedQuery(name = "ScamvdCalidadAire.findByIdVar", query = "SELECT s FROM ScamvdCalidadAire s WHERE s.scamvdCalidadAirePK.idVar = :idVar"),
    @NamedQuery(name = "ScamvdCalidadAire.findByDFechaReg", query = "SELECT s FROM ScamvdCalidadAire s WHERE s.scamvdCalidadAirePK.dFechaReg = :dFechaReg"),
    @NamedQuery(name = "ScamvdCalidadAire.findByNDato", query = "SELECT s FROM ScamvdCalidadAire s WHERE s.nDato = :nDato"),
    @NamedQuery(name = "ScamvdCalidadAire.findByIdFlag", query = "SELECT s FROM ScamvdCalidadAire s WHERE s.idFlag = :idFlag"),
    @NamedQuery(name = "ScamvdCalidadAire.findByDFecLocalSys", query = "SELECT s FROM ScamvdCalidadAire s WHERE s.dFecLocalSys = :dFecLocalSys")})
public class ScamvdCalidadAire implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected ScamvdCalidadAirePK scamvdCalidadAirePK;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "N_DATO")
    private BigDecimal nDato;
    @Column(name = "ID_FLAG")
    private BigInteger idFlag;
    @Column(name = "D_FEC_LOCAL_SYS")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dFecLocalSys;

    public ScamvdCalidadAire() {
    }

    public ScamvdCalidadAire(ScamvdCalidadAirePK scamvdCalidadAirePK) {
        this.scamvdCalidadAirePK = scamvdCalidadAirePK;
    }

    public ScamvdCalidadAire(BigInteger idEsta, BigInteger idVar, Date dFechaReg) {
        this.scamvdCalidadAirePK = new ScamvdCalidadAirePK(idEsta, idVar, dFechaReg);
    }

    public ScamvdCalidadAirePK getScamvdCalidadAirePK() {
        return scamvdCalidadAirePK;
    }

    public void setScamvdCalidadAirePK(ScamvdCalidadAirePK scamvdCalidadAirePK) {
        this.scamvdCalidadAirePK = scamvdCalidadAirePK;
    }

    public BigDecimal getNDato() {
        return nDato;
    }

    public void setNDato(BigDecimal nDato) {
        this.nDato = nDato;
    }

    public BigInteger getIdFlag() {
        return idFlag;
    }

    public void setIdFlag(BigInteger idFlag) {
        this.idFlag = idFlag;
    }

    public Date getDFecLocalSys() {
        return dFecLocalSys;
    }

    public void setDFecLocalSys(Date dFecLocalSys) {
        this.dFecLocalSys = dFecLocalSys;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scamvdCalidadAirePK != null ? scamvdCalidadAirePK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScamvdCalidadAire)) {
            return false;
        }
        ScamvdCalidadAire other = (ScamvdCalidadAire) object;
        if ((this.scamvdCalidadAirePK == null && other.scamvdCalidadAirePK != null) || (this.scamvdCalidadAirePK != null && !this.scamvdCalidadAirePK.equals(other.scamvdCalidadAirePK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScamvdCalidadAire[ scamvdCalidadAirePK=" + scamvdCalidadAirePK + " ]";
    }
    
}
